home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / sort2.zip / ERREXIT.INC < prev    next >
Text File  |  1993-01-04  |  340b  |  12 lines

  1. procedure errexit(msg: string);
  2. { write a message to the console and exit the program with an error code }
  3. { Copyright 1988,1989, by J. W. Rider }
  4.  
  5. var fe:text; begin
  6.  
  7. { The global variable "pname" must be set with the name of the program. }
  8.  
  9. assign(fe,'CON'); rewrite(fe); writeln(fe,pname,': ',msg); close(fe);
  10. halt(1); end;
  11.  
  12.